def usernameCheck(userName):
    length = len(userName)
    if length < 6 or length > 10:
        raise Exception('用户长度必须为6~10位！')
def passwordCheck(password):
    length = len(password)
    if length >= 8 and length <=16:
        if password.isalnum():
            if password.isdigit() or password.isalpha():
                raise Exception('密码必同时包含数字和字母！')
            else:
                raise Exception('密码只能包含数字和字母！')
        else:
            raise Exception('密码长度必须为8~16位！')
while True:
    try:
        
